<!DOCTYPE html>
<html ng-app='passApp'>
    <head>
        <meta charset="utf-8">
        <title>找回密码</title>
        <script src="app/bower_components/angular/angular.min.js"></script>
    </head>
    <body>
        <div class="" ng-controller="GetPassCtrl">
            <input type="text" name="userid" ng-model="userid" placeholder="请输入用户ID" required>
            <button class="btn btn-lg btn-primary btn-block" ng-click="getPass(userid)" ng-disabled="userid==null">{{getpass}}</button>

        </div>
        <script type="text/javascript">
            var app = angular.module('passApp', []);
            app.controller('GetPassCtrl', function($scope,$http) {
              $scope.getpass="找回密码";
                $scope.getPass = function(userid){
                  $scope.userid=null
                  $scope.getpass="请等待。。。";
                  $http.post('services/auth/forgetPass/'+userid)
                  .success(function(data, status, headers, config) {
                      alert(data.msg);
                      $scope.getpass="找回密码";
                  });
                };
            });
        </script>

    </body>
</html>
